﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for DAL_Contact
/// </summary>
public class DAL_Contact
{
    public void GuiContact(DTO_Contactcs obj)
    {
        DbProvider Dbpro = new DbProvider();
        string sql = string.Format("INSERT INTO Contact (Name, Gender, Address, Tell, Mail, Detail, Date) VALUES('{0}','{1}','{2}','{3}','{4}','{5}','{6}')", obj.Name, obj.Gender, obj.Address, obj.Tell, obj.Mail, obj.Detail, obj.Date);
        try
        {

            Dbpro.ExecuteNonQuery(sql);
        }
        catch (Exception Ex)
        {

            throw new Exception(Ex.Message);
        }

    }
}